<script setup lang="ts">
//引入组合式API函数之生命周期函数
import {onMounted} from "vue";
import useUserStore from "@/store/modules/user.ts";
let userStore = useUserStore();
onMounted(() => {
  //获取用户信息
  userStore.userInfo();
});
</script>

<template>
      <div>{{userStore.username}}</div>
</template>

<style scoped>

</style>